// [[ OnflowGenerator Entity UUID: 334d724ba7d143a49549086b85b568de ]]
package com.itdct.onflow.system.role.entity

import com.baomidou.mybatisplus.annotation.TableName
import com.itdct.onflow.core.annotation.Column
import com.itdct.onflow.core.annotation.ColumnRelateDict
import com.itdct.onflow.core.annotation.TableDescription
import com.itdct.onflow.core.entity.BaseUserEntity

/**
 * @author Zhouwx
 * @date 2025/8/21 19:45:10
 * @version 1.0
 * @description
 */
@TableDescription("系统角色")
@TableName("sys_role")
class SysRoleEntity : BaseUserEntity() {
    @Column(comment = "角色名", nullable = false, length = 50, sort = 10, forSelect = true)
    var name = ""

    @Column(comment = "角色编码", nullable = false, unique = true, length = 100, sort = 20, forSelect = true)
    var code = ""

    @ColumnRelateDict(dictCode = "platformType")
    @Column(comment = "平台类型", nullable = false, length = 100, defaultValue = "onflow-backend", indexed = true, sort = 30)
    var platformType = ""

    @Column(comment = "是否启用", nullable = false, defaultValue = "1", sort = 80)
    var enable = true

    @Column(comment = "是否为超级管理员角色", nullable = false, defaultValue = "0", sort = 90)
    var superAdmin = false

    @Column(comment = "备注", length = 500, sort = 100)
    var remark: String? = null
}